package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-07-20
 * Time: 13:52
 */
public class Test {
    public void siftUp(int c){
        int p = (c - 1) / 2;
        while(p >= 0){
            if(elem[p]  < elem[c]){
                int tmp = elem[p];
                elem[p] = elem[c];
                elem[c] = tmp;
            }
            c = p;
            p = (c - 1) / 2;
        }
    }
    public static void main(String[] args) {

    }
}
